﻿using Microsoft.EntityFrameworkCore.Migrations;

namespace HongStone.Repository.Migrations
{
    public partial class gochu : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
           
            migrationBuilder.CreateTable(
                name: "GoZiGe",
                columns: table => new
                {
                    GoZiGeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    DictionariesId = table.Column<int>(type: "int", nullable: false),
                    Num = table.Column<int>(type: "int", nullable: false),
                    Sum = table.Column<int>(type: "int", nullable: false),
                    Sums = table.Column<int>(type: "int", nullable: false),
                    PNum = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_GoZiGe", x => x.GoZiGeId);
                });

            migrationBuilder.CreateTable(
                name: "RelationGo",
                columns: table => new
                {
                    GoZiGeId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StaffId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RelationGo", x => x.GoZiGeId);
                });

            migrationBuilder.CreateTable(
                name: "RelationGos",
                columns: table => new
                {
                    StaffGoListId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    StaffId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_RelationGos", x => x.StaffGoListId);
                });

            migrationBuilder.CreateTable(
                name: "StaffGoList",
                columns: table => new
                {
                    StaffGoListId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Year = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Fa = table.Column<int>(type: "int", nullable: false),
                    JiSuan = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    YuE = table.Column<decimal>(type: "decimal(18,2)", nullable: false),
                    AnPai = table.Column<int>(type: "int", nullable: false),
                    Xiu = table.Column<decimal>(type: "decimal(18,2)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_StaffGoList", x => x.StaffGoListId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "GoZiGe");

            migrationBuilder.DropTable(
                name: "RelationGo");

            migrationBuilder.DropTable(
                name: "RelationGos");

            migrationBuilder.DropTable(
                name: "StaffGoList");

          
        }
    }
}
